@extends('wechat.base')
@section('content')
<div style="margin-top: 20%" class="page">
    <div class="weui-msg">
        <div class="weui-msg__icon-area"><i class="weui-icon-success weui-icon_msg"></i></div>
        <div class="weui-msg__text-area">
            <h2 class="weui-msg__title">注册成功</h2>
        </div>
        <div onclick="scanQRCode()" style="margin: 40px;text-align: center"><a href="javascript:;" class="weui-btn weui-btn_plain-primary">扫码进店</a></div>
    </div>
</div>
@endsection
@section('otherjs')
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
    wx.config(<?php echo $js->config(array('scanQRCode'), false) ?>);
    function scanQRCode() {
        wx.scanQRCode({
            needResult: 0, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
            scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码，默认二者都有
            success: function (res) {
                var result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
            }
        });
    }
</script>
@endsection